<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>02v-once</title>
</head>
<body>
    <h2>只绑定一次</h2>
    <ul>
        <li>被v-once属性修饰的标签，vue第一次绑定完值之后，属性改变了，标签的作用的值不会改变</li>
    </ul>
    <main id="app">
        <div v-text="date" v-once></div>
        <div v-once>我使用了v-once: {{date}}</div>
        <div>不使用v-once: {{date}}</div>
    </main>
</body>
<script src="../vue.js"></script>
<script>
    let vue = new Vue({
        el: "#app",
        data: {
            date: new Date()
        },
    })

    setInterval(() => {
        vue.date = new Date();
    },1000)
</script>
</html>